home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_061 / microemacs / evar.h < prev    next >
Text File  |  1992-05-06  |  3KB  |  108 lines

  1. /*    EVAR.H:    Environment and user variable definitions
  2.         for MicroEMACS
  3.  
  4.         written 1986 by Daniel Lawrence
  5. */
  6.  
  7. /*    structure to hold user variables and their definitions    */
  8.  
  9. typedef struct UVAR {
  10.     char u_name[NVSIZE + 1];        /* name of user variable */
  11.     char *u_value;                /* value (string) */
  12. } UVAR;
  13.  
  14. /*    current user variables (This structure will probably change)    */
  15.  
  16. #define    MAXVARS        100
  17.  
  18. UVAR uv[MAXVARS];    /* user variables */
  19.  
  20. /*    list of recognized environment variables    */
  21.  
  22. char *envars[] = {
  23.     "fillcol",        /* current fill column */
  24.     "pagelen",        /* number of lines used by editor */
  25.     "curcol",        /* current column pos of cursor */
  26.     "curline",        /* current line in file */
  27.     "ram",            /* ram in use by malloc */
  28.     "flicker",        /* flicker supression */
  29.     "curwidth",        /* current screen width */
  30.     "cbufname",        /* current buffer name */
  31.     "cfname",        /* current file name */
  32.     "sres",            /* current screen resolution */
  33.     "debug",        /* macro debugging */
  34.     "status",        /* returns the status of the last command */
  35. };
  36.  
  37. #define    NEVARS    sizeof(envars) / sizeof(char *)
  38.  
  39. /*     and its preprocesor definitions        */
  40.  
  41. #define    EVFILLCOL    0
  42. #define    EVPAGELEN    1
  43. #define    EVCURCOL    2
  44. #define    EVCURLINE    3
  45. #define    EVRAM        4
  46. #define    EVFLICKER    5
  47. #define    EVCURWIDTH    6
  48. #define    EVCBUFNAME    7
  49. #define    EVCFNAME    8
  50. #define    EVSRES        9
  51. #define    EVDEBUG        10
  52. #define    EVSTATUS    11
  53.  
  54. /*    list of recognized user functions    */
  55.  
  56. typedef struct UFUNC {
  57.     char *f_name;    /* name of function */
  58.     int f_type;    /* 1 = monamic, 2 = dynamic */
  59. } UFUNC;
  60.  
  61. #define    MONAMIC        1
  62. #define    DYNAMIC        2
  63. #define    TRINAMIC    3
  64.  
  65. UFUNC funcs[] = {
  66.     "add", DYNAMIC,        /* add two numbers together */
  67.     "sub", DYNAMIC,        /* subtraction */
  68.     "tim", DYNAMIC,        /* multiplication */
  69.     "div", DYNAMIC,        /* division */
  70.     "mod", DYNAMIC,        /* mod */
  71.     "neg", MONAMIC,        /* negate */
  72.     "cat", DYNAMIC,        /* concatinate string */
  73.     "lef", DYNAMIC,        /* left string(string, len) */
  74.     "rig", DYNAMIC,        /* right string(string, pos) */
  75.     "mid", TRINAMIC,    /* mid string(string, pos, len) */
  76.     "not", MONAMIC,        /* logical not */
  77.     "equ", DYNAMIC,        /* logical equality check */
  78.     "les", DYNAMIC,        /* logical less than */
  79.     "gre", DYNAMIC,        /* logical greater than */
  80.     "seq", DYNAMIC,        /* string logical equality check */
  81.     "sle", DYNAMIC,        /* string logical less than */
  82.     "sgr", DYNAMIC,        /* string logical greater than */
  83.     "ind", MONAMIC,        /* evaluate indirect value */
  84. };
  85.  
  86. #define    NFUNCS    sizeof(funcs) / sizeof(char *)
  87.  
  88. /*     and its preprocesor definitions        */
  89.  
  90. #define    UFADD        0
  91. #define    UFSUB        1
  92. #define    UFTIMES        2
  93. #define    UFDIV        3
  94. #define    UFMOD        4
  95. #define    UFNEG        5
  96. #define    UFCAT        6
  97. #define    UFLEFT        7
  98. #define    UFRIGHT        8
  99. #define    UFMID        9
  100. #define    UFNOT        10
  101. #define    UFEQUAL        11
  102. #define    UFLESS        12
  103. #define    UFGREATER    13
  104. #define    UFSEQUAL    14
  105. #define    UFSLESS        15
  106. #define    UFSGREAT    16
  107. #define    UFIND        17
  108.